package com.agent;

import com.bytecode.Transformer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.instrument.Instrumentation;

/**
 * <p>
 * 监控探针入口
 * </p>
 *
 * @author Arnold Yang
 * @since 2018-09-03
 */
public class AgentBootStrap {

  private static Logger logger = LoggerFactory.getLogger(AgentBootStrap.class);

  public static void premain(String args, Instrumentation inst) {
    if (args == null) {
      args = "";
    }
    logger.info("monitor agent args:" + args);
    inst.addTransformer(new Transformer());
  }

}
